<template>
	<view>
		<view class="infoView">
			<view class="item flex-row-flex-start">
				<view class="columnLine1">
					
				</view>
				<view class="title">
					填写新员工信息
				</view>
			</view>
			<view class="item flex-row-space-between">
				<view class="left">
					
					<text class="red">*</text>
					姓名
				</view>
				<input v-model="info.nickname" class="right" type="text" placeholder="请输入姓名" />
			</view>
			<view class="item flex-row-space-between">
				<view class="left">
					
					<text class="red">*</text>
					手机号
				</view>
				<input v-model="info.mobile" class="right" type="text" placeholder="请输入手机号" />
			</view>
	<!-- 		<view class="item flex-row-space-between">
				<view class="left">
		
					性别
				</view>
				<view class="flex-row-flex-end">
					<view class="right">
						
					</view>
					<uni-icons type="down" size="20"></uni-icons>
				</view>
			</view> -->
			<view class="item flex-row-space-between">
				<view class="left">
					
					<text class="red">*</text>
					所属部门
				</view>
				<view class="flex-row-flex-end">
					<view class="right">
						{{store_name}}
					</view>
				</view>
			</view>
		</view>
		<view class="fixed-bottom ">
			<view @click="staffAdd()" class="bottomButton">
				确定
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapActions,
		mapState
	} from "vuex";
	import {
		staffAdd,
	} from '@/api/index.js'
	export default {
		components: {},
		computed: {

		},
		data() {
			return {
				store_name:uni.getStorageSync('storeInfo').store_name,
				info:{
					store_id:uni.getStorageSync('storeInfo').id,
					nickname:'',
					mobile:'',
					gender:1
				},
				list: [],
				title: "",
				backgroundColor: 'ffffff00',
				list: [],
				data: {}

			}
		},
		computed: {
			...mapState([
				'baseColor'
			]),
		},
		onPageScroll(e) {
			if (e.scrollTop > 20) {
				this.backgroundColor = "#AED0FC"
			} else {
				this.backgroundColor = "#ffffff00"
			}
		},
		onShow() {
this.loadData()
		},
		onLoad(e) {
			
		},
		//下拉刷新
		onPullDownRefresh() {


		},
		//加载更多
		onReachBottom() {

		},
		onPageScroll(e) {
			// if (e.scrollTop > 20) {
			// 	this.backgroundColor = "#FBF9FF"
			// } else {
			// 	this.backgroundColor = "#ffffff00"
			// }
		},
		methods: {
			staffAdd(){
				var data = {
					page: 1,
					page_size:999
				}
				staffAdd(this.info).then(res => {
					this.back(res)
				})
			},
			loadData() {

				var data = {
					page: 1,
					page_size:999
				}
				signList(data).then(res => {
					this.list = res.data.data
				})
			},


		}
	}
</script>

<style lang="scss">
.infoView{
	padding: 10rpx 0;
	margin: 30rpx;
	background: #FFFFFF;
	border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.item{
	padding: 0 30rpx;
	height: 96rpx;
}
.columnLine1{
	margin-right: 20rpx;
	width: 8rpx;
	height: 24rpx;
	background: #157EFE;
}
.title{
	font-weight: bold;
	font-size: 32rpx;
	color: #333333;
}
.left{
	
	font-weight: 500;
	font-size: 30rpx;
	color: #333333;
}
.red{
	color: #FF4536;
}
.right{
	text-align: right;
	font-weight: 500;
	font-size: 30rpx;
	color: #BBBBBB;
}
</style>